import { getList,deleteComment } from '@/api/comment'

const actions = {
    getList({ commit },getdata) {
        return new Promise((resolve, reject) => {
            getList(getdata).then(response => {
                // console.log(response)
                // const { data } = response
                resolve(response)
            }).catch(error => {
                reject(error)
            })
        })
    },
    deleteComment({ commit },deldata) {
        return new Promise((resolve, reject) => {
            deleteComment(deldata).then(response => {
                const { data } = response
                resolve()
            }).catch(error => {
                reject(error)
            })
        })
    }
}

export default {
    namespaced: true,
    actions
}

